package littlecyberwar.model;

import java.util.Properties;

/**
 * This interface is used to represent a handler to process either
 *  1. a pbem file writer, or
 *  2. a network play socket handler.
 *  3. this is used to handle "external" (to a file or network socket) ONLY
 */
public interface CmdBackingStore {

  /**
   * The prop contains all requires parameters to start up the backing store: (i.e. a file name
   * for file writer, or a socket address for connecting to another player
   */
  public void open( Properties prop );

  /**
   * the call to pass in a command ==> the backing store
   */
  public void add( Command cmd );

  /**
   * close the backing store (close the file, or close the socket, etc.)
   */
  public void close();
}